package com.cryptoneedle.center.source.repository.metadata;


import com.bubbles.engine.data.core.repository.BaseRepository;
import com.cryptoneedle.center.source.entity.metadata.SourceCatalog;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>description: 源数据源-目录 </p>
 *
 * @author CryptoNeedle
 * @date 2025-06-20
 */
@Repository
public interface SourceCatalogRepository extends BaseRepository<SourceCatalog, String> {
    
    @Query("FROM SourceCatalog WHERE sourceCatalogEnabled = TRUE")
    List<SourceCatalog> listEnabled();
    
    @Query("FROM SourceCatalog WHERE transform.transformSystemCode = :transformSystemCode")
    SourceCatalog getByTransformSystemCode(String transformSystemCode);
}